<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let ws = new WebSocket('ws://localhost:8080/')

        ws.onopen=function(){
            alert('链接已建立')
        }
        ws.onmessage=function(){}
        ws.onclose=function(){}
        ws.onerror=function(){}
    </script>
</head>
<body>
    
</body>
</html>